1. Field of the Invention
The present invention relates to a method of controlling the power consumption in an information processor such as a personal computer depending on the change in the operating status of a running application program in the information processor, and more specifically, to a power control method which is used for a portable personal computer which can be driven by batteries and an apparatus therefor.
2. Description of the Related Art
Conventionally in a personal computer which can be driven by batteries, a method of controlling power depending on the operating status of an application program is roughly classified into four types described below.
The first method is xe2x80x9cPower Saving Control Systemxe2x80x9d described in Japanese Patent Laying-Open No. 4-125718. In this method, when a state where an application program waits for input and a state where there is no input from an input device are continued for a predetermined time period, the supply of a clock from a CPU and the supply of power is stopped. As a result, the power consumption is reduced, to extend the operating time of the batteries or reduce the battery capacity. That is, the method is a method of saving, when there is a little or no load inputted to the CPU, power by uniformly bringing the CPU into a dormant state.
The second method is xe2x80x9cElectronic Equipment And Its Power Control Methodxe2x80x9d described in Japanese Patent Laying-Open No. 7-302138. In this method, a history of accesses to each device is first recorded for each application program. On the basis of the recording of the history of accesses, the time when the application program accesses the device is then predicted. The transition of the device to a power saving mode is then made on the basis of the predicted time. That is, the method is a method of comparing an amount of saved power which can be expected by making the transition of the device to the power saving mode from the current time to the predicted time with an amount of power required to return the device to a normal mode at the predicted time, to control the operation mode of the device such that the power consumption is made smaller.
The third method is xe2x80x9cMethod of Autonomously Reducing Power Consumption in a computer system by compiling a history of power consumptionxe2x80x9d described in Published Japanese Translation of PCT International Publication for Patent Application No. 8-503566 (Corresponding U.S. Pat. No. 5,339,445). In this method, the power consumption of a power consumption equipment in the computer system is monitored while an application program is being operated, and is recorded on a table of the computer system for holding the characteristics of resources of the system. The method is a method of calling the characteristics of the required resource when the application program is operated again, and automatically adjusting power supplied to the equipment in the computer system, to reduce the power consumption of the computer system.
The fourth method is a power control method generally used for an information processor which can be driven by both AC power and batteries which are supplied to homes and offices. In this method, it is judged whether the information processor is driven by the AC power or the batteries. When the information processor is driven by the batteries, it is operated using a power control method which has been previously set by a user. In this method, the operating speed of a CPU and the luminance of an LCD are reduced to fixed values designated by the user when the information processor is driven by the batteries to reduce the power consumption, thereby extending the driving time by the batteries.
The above-mentioned conventional power control method cannot cope with a rapid increase in the application program making maximum use of the performances of the CPU and peripherals obtained by recent rapid improvement of the processing speed of the CPU and the performance of the peripherals such as hard disk. Typical examples of such an application program are application software for reproducing a moving image or performing processing of the moving image such as recording of the moving image and application software for realizing a modem function.
Under such circumferences, when power is controlled by a method of uniformly reducing the operation speed of the CPU and the power consumption of the peripherals to fixed values, as in the above-mentioned first and fourth power control methods, a moving image processing application program or the like making maximum use of the performances of the CPU and the peripherals cannot be operated. Alternatively, the performances thereof cannot be sufficiently exhibited.
The above-mentioned second and third power control methods are superior in that power is controlled for each device used by the application program. When there is a request to particularly make maximum use of the performances of the CPU and the peripherals, as at the time of starting the application program and at the time of reproducing the moving image, in running the application program, the speed of the CPU and the amount of power are not changed depending on the request. When the load required of the resource greatly varies for each hardware depending on the contents of the operation of the application program, power control properly corresponding to the variation in the request is impossible. Accordingly, the application program cannot, in some cases, be operated, or the performances of the CPU and the peripherals cannot, in some cases, be sufficiently exhibited, as in the first and fourth power control methods.
In any of the conventional power control methods, in order to control power while properly running the application program, a user must previously set the power control method in detail or must always set the speed of the CPU to a sufficiently large value. It is very troublesome to sequentially and manually set the power control method in detail while the application program is running. Even if such troublesome detailed setting is performed, it is very difficult to perform the detailed setting at correct timing while the application program is running. If the speed of the CPU is fixedly set to a sufficiently large value, the power consumption is unnecessarily increased, and the driving time by the batteries is decreased. Therefore, the original object of the power control cannot be attained.
In the above-mentioned conventional power control method, an object is to extend the driving time of the information equipment driven by batteries, or reduce the size of the batteries in order to provide the same driving time. Therefore, the power control is considered only from the point of view of how power supplied to each of resources of the hardware is reduced at the time of running the application program. Therefore, the application program cannot be run normally, although the power consumption can be reduced, as described above.
Currently, global warming and exhaustion of energy resources are actually great problems. The reduction in the power consumption is not merely limited to the information equipment driven by batteries, but is a technique required of the overall electrical apparatus driven by AC power.
In running the application program, therefore, the minimum power required to properly drive each of the resources of the hardware must be supplied depending on the change in a state where the application program is running. In running the application program, therefore, power is prevented from being excessively supplied to the hardware any more than necessary to run the application program, to prevent the excessive power from being uselessly consumed. As a result, in running the application program, the power can be efficiently utilized without being uselessly utilized, and the power consumption can be reduced.
The present invention has been made in order to solve the above-mentioned problem and has for its object to provide a power control method, which is used in an electrical apparatus represented by an information apparatus, for properly and effectively distributing power among the resources depending on a state where the application program is running to prevent the power from being uselessly consumed by being excessively supplied, thereby reducing power consumption and an apparatus therefor.
The object of the present invention is therefore to resolve the above-noted problems by providing a power control method and apparatus therefor.
To achieve this object, a first aspect of the present invention is directed to a power control apparatus for controlling, in an electrical apparatus for running the application program, the power consumption of each of resources for running the application program, comprising:
an operation status detector for detecting operation statuses of the application program;
a load determinator for determining a load required of the resource in the detected operation status of the application program; and
a resource operation controller for controlling an operation parameter which affects a load on each of the resources such that the resource is operated by the load determined by the load determinator,
the resource being driven by power suited to run the application program by the variation in the load depending on the operation status of the application program.
As described above, in the first aspect of the present invention, each of the resources is operated by an amount of power actually required to run the application program, thereby making it possible to prevent power from being unnecessarily consumed.
A second aspect of the present invention is characterized in that in the first aspect, the load determinator comprise
a load factor storage for storing a load factor for the resource which is previously set depending on the operation status of the application program, and
a load factor acquisition for reading out from the load factor storage a load factor for the resource corresponding to the operation status detected by the operation status detector,
the load factor being set in a range peculiar to the resource depending on the load.
As described above, in the second aspect of the present invention, even when the load factor, which has been set once, peculiar to the resource is changed, or the resource is replaced with another resource, or when the operation of the application program is changed, the load factor can be reset to a proper value.
A third aspect of the present invention is characterized in that in the second aspect, the load determinator further comprise
a load factor integrator for integrating, when a plurality of load factors are acquired for the same resource by the load factor acquisition, the plurality of load factors,
the resource to which the plurality of loads are simultaneously applied being driven by power sufficient for the loads.
As described above, in the third aspect of the present invention, the loads simultaneously required of the same resource can be correctly determined depending on the load corresponding to the entire system in performing each of operations of the application program.
A fourth aspect of the present invention is characterized in that in the third aspect, the load factor integrator integrates, when the sum of the plurality of load factors acquired for the same resource is not more than 100%, the plurality of load factors into the sum of the load factors, while integrating, when the sum of the plurality of load factors is not less than 100%, the load factors into 100%, to prevent the loads from being applied to the resource in excess of the maximum capability of the resource.
As described above, in the fourth aspect of the present invention, it is possible to respond to a load request from the application program to the utmost depending on the actual capability of the resource.
A fifth aspect of the present invention is characterized in the first aspect, the operation status detector detects the operation status of the application program on the basis of API communication information detected by an API layer in an operation system loaded into the electrical apparatus and operation status monitor information detected by a Kernel layer.
As described above, in the fifth aspect of the present invention, the present invention is applicable to a computer system having the operation system.
A six aspect of the present invention is characterized in that in the third aspect, the load factor integrator supplies the load factor obtained by the integration to a driver interface layer in the operation system loaded into the electrical apparatus.
As described above, in the sixth aspect of the present invention, the present invention is applicable to a computer system having the operation system.
A seventh aspect of the present invention is characterized in that in the sixth aspect, the driver interface layer supplies the load factor obtained by the integration to drivers for the corresponding resources.
As described above, in the seventh aspect of the present invention, it is possible to control the power consumption of an arbitrary peripheral connected to a computer system.
An eighth aspect of the present invention is characterized in that in the second aspect, the load factor is the operation rate for the resource.
As described above, in the eighth aspect of the present invention, it is possible to control the power consumption utilizing an operation control function provided in each of the resources.
A ninth aspect of the present invention is directed to a power control method of controlling the power consumption of each of resources for running an application program in an electrical apparatus for running the application program, comprising:
the operation status detection step of detecting operation statuses of the application program;
the load determination step of determining a load required of the resource in the detected operation status of the application program; and
resource operation control step of controlling an operation parameter which affects a load on each of the resources such that the resource is operated by the load determined by the load determination step,
the resource being driven by power suited to run the application program by the variation in the load depending on the operation status of the application program.
As described above, in the ninth aspect of the present invention, each of the resources is operated by an amount of power actually required to run the application program, thereby making it possible to prevent power from being unnecessarily consumed.
A tenth aspect of the present invention is characterized in that in the ninth aspect, the load determination step comprises the load factor storage step of storing load factors for
the resource which are previously set depending on the operation statuses of the application program, and
the load factor acquisition step of reading out a load factor for the resource corresponding to the operation status detected at the operation status detection step out of the load factors stored at the load factor storage step,
the load factor being set in a range peculiar to the resource depending on the load.
As described above, in the tenth aspect of the present invention, when the load factor, which has been set once, peculiar to the resource is changed, or the resource is replaced with another resource, or when the operation of the application program is changed, the load factor can be also reset to a proper value.
An eleventh aspect of the present invention is characterized in that in the tenth aspect, the load determination step further comprises
the load factor integration step of integrating, when the plurality of load factors are acquired for the same resource by the load factor acquisition step, the plurality of load factors,
the resource to which the plurality of loads are simultaneously applied being driven by power sufficient for the loads.
As described above, in the eleventh aspect of the present invention, the loads simultaneously required of the same resource can be correctly determined depending on the load on the entire system in performing each of the operations of the application program.
A twelfth aspect of the present invention is characterized in that in the eleventh aspect, the load factor integration step integrates, when the sum of the plurality of load factors acquired for the same resource is not more than 100%, the plurality of load factors into the sum of the load factors, while integrating, when the sum of the plurality of load factors is not less than 100%, the load factors into 100%, to prevent the loads from being applied to the resource in excess of the maximum capability of the resource.
As described above, in the twelfth aspect of the present invention, it is possible to respond to a load request from the application program to the utmost depending on the actual capability of the resource.
A thirteenth aspect of the present invention is characterized in that in the ninth aspect, the operation status detection step detects the operation status of the application program on the basis of API communication information detected by an API layer in the operation system loaded into the electrical apparatus and operation status monitor information detected by a Kernel layer.
As described above, in the thirteenth aspect of the present invention, the present invention is applicable to a computer system having the operation system.
A fourteenth aspect of the present invention is characterized in that in the eleventh aspect, the load factor obtained by the integration at the load factor integration step is supplied to a driver interface layer in the operation system loaded into the electrical apparatus.
As described above, in the fourteenth aspect of the present invention, the present invention is applicable to a computer system having the operation system.
A fifteenth aspect of the present invention is characterized in that in the fourteenth aspect, the driver interface layer supplies the load factor obtained by the integration to drivers for the corresponding resources.
As described above, in the fifteenth aspect of the present invention, it is possible to control the power consumption of the arbitrary peripheral connected to a computer system.
A sixteenth aspect of the present invention is characterized in that in the tenth aspect, the load factor is the operation rate for the resource.
As described above, in the sixteenth aspect of the present invention, it is possible to control the power consumption utilizing an operation control function provided in each of the resources.
A seventeenth aspect of the present invention is directed to a computer program capable of running on a computer so that the system comprising the computer program plus the computer carries out a method according to any one of the ninth through sixteenth aspects.
An eighteenth aspect of the present invention is directed to a computer program loadable into a computer so that the computer programmed in this way is capable of carrying out a method according to any one of the ninth through sixteenth aspects.
A nineteenth aspect of the present invention is directed to a computer program product comprising a computer readable medium, having thereon: computer program code means, when the program is loaded, to make the computer execute a method according to any one of the ninth through the sixteenth aspects.
A twentieth aspect of the present invention is characterized in that in the first aspect, the load determinator further determines a load required for each of the different resources,
so that each of the resources is driven by power suited to run the application program by the variation in the load depending on the operation status of the application program.
A twenty-first aspect of the present invention is characterized in that the load determination step further determines a load required for each of different resources,
so that each of the resources is driven by power suited to run the application program by the variation in the load depending on the operation status of the application program.